define(['./../initial'], function() {
    var app = angular.module('App.home');
    app.directive('infoModal', ['$timeout', function($timeout) {
        return {
            restrict: 'AE',
            scope: {
                title: "@",
                content: "@",
                onConfirm: "=",
                onCancel: "=",
                button: "@"
            },
            link: function(scope, iElement, iAttrs) {
                $timeout(function() {
                    $('#infoModal').modal({
                        onHidden: function() {
                            $('#infoModal').remove();
                            scope.$destroy();
                        }
                    }).modal('show');
                }, 200);
            },
            replace: true,
            templateUrl: '/partials/infoModal.html'
        };
    }]);
});
